package course

//课程返回信息
type CourseResponse struct {
	CourseId     int     `json:"course_id"`
	Title        string  `json:"title"`          //课程标题
	Price        float64 `json:"price"`          //课程价格
	YPrice       float64 `json:"y_price"`        //实际价格
	LearnPeCount int     `json:"learn_pe_count"` //学习人数
	IsLearning   int     `json:"is_learning"`    //是否立即学习
	IsLogin      int     `json:"is_login"`       //是否已经登录
	Image        string  `json:"image"`          //封面地址
	LearnUrl     string  `json:"learn_url"`      //ke
	Desc         string  `json:"desc"`           //描述
}

func NewCourseResponse(title string, price float64, YPrice float64, learnPeCount int, isLearning int, isLogin int) *CourseResponse {
	return &CourseResponse{Title: title, Price: price, YPrice: YPrice, LearnPeCount: learnPeCount, IsLearning: isLearning, IsLogin: isLogin}
}

type CourseLists struct {
	Data      []*CourseResponse `json:"data"`
	Page      int               `json:"page"`       //页数
	PageSize  int               `json:"page_size"`  //分页
	TotalSize int               `json:"total_size"` //总条数
}
